import {DIC} from "@/utils/dict"

export default{
  methods: {
    dateShowFormat(date){
      let result=''
      if(date.year){
        result += `${date.year}年`
      }
      if(date.unitType === DIC.dateType[2].value  && date.week){
        result += `第${date.week}周`
        return result
      }
      if(date.unitType !== DIC.dateType[0].value && date.month){
        result += `${date.month}月`
      }
      if(date.unitType === DIC.dateType[3].value && date.day){
        result += `${date.day}日`
      }
      return result
    }
  }
}